import config from "../config/index";
import http from "../http/index";


class IndexService {
    async login(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.login,
            data: data,
            header: header
        })
    }
    async customerbind(data = {}, header = {}) {
        return await http.post({
            url: config.urlList.customerbind,
            data: data,
            header: header
        })
    }
    async customermy(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.customermy,
            data: data,
            header: header
        })
    }
    async homeget(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.homeget,
            data: data,
            header: header
        })
    }


    async customerunbind(data = {}, header = {}) {
        return await http.post({
            url: config.urlList.customerunbind,
            data: data,
            header: header
        })
    }
    async customerdefault(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.customerdefault,
            data: data,
            header: header
        })
    }


    async ordercomment(data = {}, header = {}) {
        return await http.post({
            url: config.urlList.ordercomment,
            data: data,
            header: header
        })
    }
    async myOrderdetail(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.myOrderdetail,
            data: data,
            header: header
        })
    }
    async myOrderrecords(data = {}, header = {}) {
        return await http.post({
            url: config.urlList.myOrderrecords,
            data: data,
            header: header
        })

    }
    async afterSalesections(data = {}, header = {}) {
        return await http.post({
            url: config.urlList.afterSalesections,
            data: data,
            header: header
        })
    }
    async afterSalesuggestions(data = {}, header = {}) {
        return await http.post({
            url: config.urlList.afterSalesuggestions,
            data: data,
            header: header
        })
    }
    async configget(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.configget,
            data: data,
            header: header
        })
    }
    async shopget(data = {}, header = {}) {
        return await http.post({
            url: config.urlList.shopget,
            data: data,
            header: header
        })
    }
    async getcomment(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.getcomment,
            data: data,
            header: header
        })
    }
    async centerque(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.centerque,
            data: data,
            header: header
        })
    }
    async serviceques(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.serviceques,
            data: data,
            header: header
        })
    }
    async commentques(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.commentques,
            data: data,
            header: header
        })
    }
    async afterSaleschedule(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.afterSaleschedule,
            data: data,
            header: header
        })
    }
    async getactivity(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.getactivity,
            data: data,
            header: header
        })
    }
    async add_reservation(data = {}, header = {}) {
        return await http.post({
            url: config.urlList.add_reservation,
            data: data,
            header: header
        })
    }
    async cancel_reservation(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.cancel_reservation,
            data: data,
            header: header
        })
    }
    async get_reserve_records(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.get_reserve_records,
            data: data,
            header: header
        })
    }
    async reserve_detail(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.reserve_detail,
            data: data,
            header: header
        })
    }async getphone(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.getphone,
            data: data,
            header: header
        })
    }async member_card_rules(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.member_card_rules,
            data: data,
            header: header
        })
    }
    async member_card_rulesdetail(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.member_card_rulesdetail,
            data: data,
            header: header
        })
    }
    async score_change_record(data = {}, header = {}) {
        return await http.get({
            url: config.urlList.score_change_record,
            data: data,
            header: header
        })
    } async registercustomer(data = {}, header = {}) {
        return await http.post({
            url: config.urlList.registercustomer,
            data: data,
            header: header
        })
    }
    async couponget(data = {}, header = {}) {
        return await http.post({
            url: config.urlList.couponget,
            data: data,
            header: header
        })
    }
    async getCouponReleaseByPhone(data = {}, header = {}) {
        return await http.post({
            url: config.urlList.getCouponReleaseByPhone,
            data: data,
            header: header
        })
    }
}
export default new IndexService()